#include <bits/stdc++.h>
using namespace std;
#define yes cout<<"YES"<<endl
#define no cout<<"NO"<<endl
using ll = long long;
void solve(){
    string s = "kfdhtshmrw4nxg#f44ehlbn33ccto#mwfn2waebry#3qd1ubwyhcyuavuajb#vyecsycuzsmwp31ipzah#catatja3kaqbcss2th";
    set<string> ans;
    ll n = s.size();
    for (ll i = 0; i < n-8;i++)
    {
        bool f1 = 0, f2 = 0, f3 = 0, f4 = 0;
        for (ll j = 8; j <= 16;j++)
        {
            if(i+j-1>=n)
                continue;
            string now = s.substr(i, j);
            for (ll k = 0;k<now.size();k++)
            {
                if(now[k]>='0'&&now[k]<='9'){
                    f1 = 1;
                }
                else if(!(now[k]>='a'&&now[k]<='z'))
                {
                    f2 = 1;
                }
            }
            if(f1&&f2){
                ans.insert(now);
            }
        }
    }
    cout << ans.size() << endl;
}
int main()
{
    int t = 1;
    //cin >> t;
    while(t--)
    {
        solve();
    }
   return 0;
}
